package pacman.objects;

import java.awt.Color;
import java.awt.Graphics;

/**
 * This class represents the dot tha pacman can eat
 * @author Carlos Massera Filho
 */
public final class Dots extends Static
{
  /**
   * Start the dot as a visible and not hitable object
   * @param posX Position X to insert a door
   * @param posY Position Y to insert a door
   */
  public Dots(float posX, float posY)
  {
    this.posX = posX;
    this.posY = posY;
    this.visible = true;
    this.passable = true;
  }

  /**
   * Draw the dot in Graphic interface
   * @param g
   */
  public void render(Graphics g)
  {
    g.setColor(Color.BLACK);
    g.fillRect((int)(posX * getCellSize()), (int)(posY * getCellSize()), (int)getCellSize(), (int)getCellSize());
    g.setColor(Color.YELLOW);
    g.fillOval((int)(posX * getCellSize() + 2 * getCellSize() / 5), (int)(posY * getCellSize() + 2 * getCellSize() / 5), (int)getCellSize() / 5, (int)getCellSize() / 5);
  }
}
